package com.qww.exec19;

class  A {
    int x = 1;
}

class B {
    final A a;
    String s;

    B() { a = new A(); }
    B(String s) {
        this.s = s;
        a = new A();
    }
    public void f() {
        // Cannot assign a value to final variable 'a'
        // a = new A();
    }
}

public class Exec19 {
    public static void main(String[] args) {
        B b = new B();
        // Cannot assign a value to final variable 'a'
        // b.a = new A();
        b.a.x = 10;
    }
}
